package com.demo.util;

import java.sql.Connection;
import java.sql.DriverManager;

public class Connector {
	
	//String url="jdbc:mysql://127.0.0.1:3306/ITEST_DB";
	//String user="root";
	//String password="159753";
	
	String url="jdbc:odbc:config";
	String user="123";
	String password="3123";
	
	public Connection getConnection(){
		 try {
			Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			 return DriverManager.getConnection(url, user, password);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}	
	}
	
	public Connection getSVCConnection(){
		 try {
			Class.forName("net.sourceforge.jtds.jdbc.Driver");
			String url="jdbc:jtds:sybase://10.109.15.40:5000/et_dcs";
			String user="et_dcs_dbo";
			String password="123456";
			 return DriverManager.getConnection(url, user, password);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}	
	}

}
